﻿using System;
using Codeflows.Logging;
using log4net;

namespace Codeflows.Contrib.Log4Net
{
    public class Log4NetLogProvider : ILogProvider
    {
        private static ILog _log = LogManager.GetLogger("Codeflows");

        public void Error(string message, Exception exception)
        {
            _log.Error(message, exception);
        }

        public void Verbose(string message)
        {
            _log.Debug(message);
        }

        public void Verbose(string format, params object[] arguments)
        {
            _log.Debug(string.Format(format, arguments));
        }

        public void Warning(string message)
        {
            _log.Warn(message);
        }

        public void Warning(string format, params object[] arguments)
        {
            _log.Warn(string.Format(format, arguments));
        }

        public void Information(string message)
        {
            _log.Info(message);
        }

        public void Information(string format, params object[] arguments)
        {
            _log.Info(string.Format(format, arguments));
        }
    }
}
